package com.wtwd.wtwddevice.service.impl;



import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.wtwd.wtwddevice.mapper.UpgradeMapper;
import com.wtwd.wtwddevice.model.entity.Upgrade;
import com.wtwd.wtwddevice.service.IUpgradeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author mjy
 * @since 2024-06-14
 */
@Service
public class UpgradeServiceImpl extends ServiceImpl<UpgradeMapper, Upgrade> implements IUpgradeService {

    @Resource
    private UpgradeMapper upgradeMapper;


    @Override
    public List<Upgrade> getDeviceUpgradeListByWatchId(String watchId) {
       return new LambdaQueryChainWrapper<>(upgradeMapper)
               .eq(Upgrade::getWatchId,watchId)
               .list();
    }
}
